package com.heima.homeservicemanagementsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.homeservicemanagementsystem.mapper.CommentSensitiveTextMapper;
import com.heima.homeservicemanagementsystem.entity.CommentSensitiveText;
import com.heima.homeservicemanagementsystem.service.CommentSensitiveTextService;
import org.springframework.stereotype.Service;

import java.util.Set;
import java.util.stream.Collectors;

/**
 * 屏蔽的敏感字段表(CommentSensitiveText)表服务实现类
 *
 * @author makejava
 * @since 2025-04-21 21:47:05
 */
@Service
public class CommentSensitiveTextServiceImpl extends ServiceImpl<CommentSensitiveTextMapper, CommentSensitiveText> implements CommentSensitiveTextService {

    @Override
    public Set<String> getAllData() {
        return this.lambdaQuery()
                .list()
                .stream()
                .map(CommentSensitiveText::getSensitiveText)
                .collect(Collectors.toSet());
    }
}

